package blogcatback.controller.user;

import blogcatback.entity.Result;

import blogcatback.service.UserService;
import blogcatback.vo.UserVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @author Lijingjing
 * @date 2024/8/29 15:42
 * @description UserController
 */

@RestController
@RequestMapping("/user")
public class UserController {

    @Autowired
   private UserService userService;

    @PostMapping ("/login")
    public Result<UserVO> login(@RequestParam("account") String account, @RequestParam("password")String password,
                                @RequestParam(value = "isAdmin",defaultValue = "false")Boolean isAdmin) {
       return userService.login(account, password,isAdmin);

    }






}
